﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Edit.Master" Inherits="System.Web.Mvc.ViewPage<Langben.DAL.ts_goods>" %>

<%@ Import Namespace="Common" %>
<%@ Import Namespace="Models" %>
<asp:Content ID="Content4" ContentPlaceHolderID="CurentPlace" runat="server">
    修改 物品表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>
            <input class="a2 f2" type="submit" value="修改" />
            <input class="a2 f2" type="button" onclick="BackList('ts_goods')" value="返回列表" />
        </legend>
        <div class="bigdiv">
            <%: Html.HiddenFor(model => model.Id ) %>     
            <%: Html.HiddenFor(model => model.i_sign)%>
            <%: Html.HiddenFor(model => model.c_class1)%>
            <%: Html.HiddenFor(model => model.c_py) %>

              <table style="width:100%">
              <tr><td width="15%" align="right"> <%: Html.LabelFor(model => model.c_code) %>：&nbsp;&nbsp;</td>
              <td width="35%"> <%: Html.EditorFor(model => model.c_code) %>
                <%: Html.ValidationMessageFor(model => model.c_code) %></td>
                <td width="15%" align="right"><%: Html.LabelFor(model => model.i_sign) %>：&nbsp;&nbsp;</td>
              <td width="35%"> <input type="text" id="tbi_sign" /></td>
            
              </tr><tr>  <td width="15%" align="right">名称：&nbsp;&nbsp;</td>
              <td width="35%"> <%: Html.EditorFor(model => model.c_desc) %>
                <%: Html.ValidationMessageFor(model => model.c_desc) %></td>
                <td width="15%" align="right"><%: Html.LabelFor(model => model.c_model) %>：&nbsp;&nbsp;</td>
              <td width="35%"><%: Html.EditorFor(model => model.c_model) %>
                <%: Html.ValidationMessageFor(model => model.c_model) %></td> 
              </tr><tr> <td width="15%" align="right"><%: Html.LabelFor(model => model.c_unit) %>：&nbsp;&nbsp;</td>
              <td width="35%"> <%: Html.EditorFor(model => model.c_unit) %>
                <%: Html.ValidationMessageFor(model => model.c_unit) %></td>
                <td width="15%" align="right"> 分类：&nbsp;&nbsp;</td>
              <td width="35%"> <%=Html.DropDownListFor(model => model.c_class, Models.SysFieldModels.GetGoodsClass(), "请选择")%>
                <%: Html.ValidationMessageFor(model => model.c_class) %></td>
              </tr><tr><td width="15%" align="right"> <%: Html.LabelFor(model => model.c_vendor) %>：&nbsp;&nbsp;</td>
              <td width="35%"> <%=Html.DropDownListFor(model => model.c_vendor, Models.SysFieldModels.GetVendorInf(), "请选择")%></td>
             <td width="15%" align="right"><%: Html.LabelFor(model => model.c_base) %>：&nbsp;&nbsp;</td>
              <td width="35%"> <%=Html.DropDownListFor(model => model.c_base, Models.SysFieldModels.GetBaseInf(), "请选择")%></td>
              </tr><tr><td align="right"> <%: Html.LabelFor(model => model.f_pricelast) %>：&nbsp;&nbsp;</td>
                 <td colspan="2"><%: Html.EditorFor(model => model.f_pricelast) %>
                <%: Html.ValidationMessageFor(model => model.f_pricelast) %></td>
                <td><span id="span1" style="color:Red; display:none">如果设置了仓库，则该物品只限本仓库使用</span></td>
                </tr><tr>  
                <td width="15%" align="right"><%: Html.LabelFor(model => model.f_upper) %>：&nbsp;&nbsp;</td>
              <td width="35%"><%: Html.EditorFor(model => model.f_upper) %>
                <%: Html.ValidationMessageFor(model => model.f_upper) %></td>
               <td width="15%" align="right"> <%: Html.LabelFor(model => model.f_lower) %>：&nbsp;&nbsp;</td>
                <td width="35%"> <%: Html.EditorFor(model => model.f_lower) %>
                <%: Html.ValidationMessageFor(model => model.f_lower) %></td> 
               </tr><tr> <td align="right"><%: Html.LabelFor(model => model.c_comment) %>：&nbsp;&nbsp;</td>
              <td colspan="3" ><%: Html.TextAreaFor(model => model.c_comment) %>
                <%: Html.ValidationMessageFor(model => model.c_comment) %></td> 
              </tr> 
            </table>    
                
        </div> 
    </fieldset>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    
    <script type="text/javascript">


        $(function () {
            $('#tbi_sign').val($('#i_sign').val());
            $('#tbi_sign').attr("disabled", true);

            if ($('#c_base').val() != "") {
                $('#span1').show();
            }
            else {
                $('#span1').hide();
            }

            $('#c_base').change(function () {
                if ($('#c_base').val() != "") {
                    $('#span1').show();
                }
                else {
                    $('#span1').hide();
                }
            });
        });
              

    </script>
</asp:Content>

